<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <style>
        body{
            background-color: rgb(194, 255, 192);
        }
    </style> -->
</head>
<body>
    <!-- <div style="width: 100px;height: 100px;background-color: #000;"></div> -->
    <!-- <div style="width: 100px;height: 100px;background-color: #fff;"></div> -->
    <!-- <div style="border: 1px solid pink;width: 800px;height: 800px;"></div> -->
    <script>
        var a = true; 
        document.write('<div style="border: 1px solid pink;width: 800px;height: 800px;">');
        for(var i=1;i<=64;i++){
            if(a){
                document.write('<div style="width: 100px;height: 100px;background-color: #000;float: left;"></div>');
            }else{
                document.write('<div style="width: 100px;height: 100px;background-color: #fff;float: left;"></div>');
            }
            a = !a;
            if(i%8==0){
                a = !a;
            }
        }
        document.write("</div>");
    </script>
</body>
</html>